<?php
include( getcwd() . '/application/views/div/html_head_info.php' );
include( getcwd() . '/application/views/div/header.php' );
?>

<div class="container"> 

<div id="settings">

<p>
	 <?php include( getcwd() . '/application/views/div/user_settings_nav.php' ); ?>
</p>

<h2>
应用设置
</h2>

<table id="app_auth_list">
	<tr>
		 <th class="span-3 border_radius_top_left">应用名称</th>
		 <th class="span-2 border_radius_top_right">操作</th>
	</tr>
<?php
	 //判断 如果只有一个 order 
	 foreach( $server_tokens as $index=>$server_token_info ){
?>
	 <tr>	 
<?php
		 echo "<td>{$server_token_info['server_uri_host']}</td>";
		 echo "<td><a href='javascript:void(0);' class='del_token'>断开</a></td>";
?>
	 <form class="<?php echo $server_token_info['token'];?>">
		<input type="text" name="consumer_key" value="<?php echo $server_token_info['consumer_key'];?>"/>
	 	<input type="text" name="token" value="<?php echo $server_token_info['token'];?>"/>
	 	<input type="text" name="user_id" value="<?php echo $server_token_info['user_id'];?>"/>
	 </form>
	 </tr>
<?php
	}
?>
</table>

</div>
</div>

<script type="text/javascript">
(function(){
	$( '.del_token' ).each( function( index , el ){
		var this_tr_el = $( el ).parent().parent();
		 
		var consumer_key = $( "input[name=consumer_key]" ).val() ,
		token = $( "input[name=token]" ).val() ,
		user_id = $( "input[name=user_id]" ).val();
	
	});
})();
</script>

<?php
include( getcwd().'/application/views/div/footer.php' );
?>


